Problem Note 39403: CALL IS8601_CONVERT restricts length of 'to-variable' to 16 bytes
When specifying the parameters for CALL IS8601_CONVERT, the 'to-variable' restricts the length to 16 bytes. If a LENGTH statement specifies a longer length, a note is produced in the log like this:
NOTE: Invalid argument to function IS8601_CONVERT at line n column n.
The documentation indicates that the variable must be at least a 16-byte character variable. This would imply that the variable's length can be longer, but currently it cannot be.
With the fix, the to-variable must be 16 or greater in length.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 | 9.3 TS1M0 |
Microsoft Windows XP Professional | 9.1 TS1M3 | 9.3 TS1M0 |
Windows Vista | 9.1 TS1M3 | 9.3 TS1M0 |
64-bit Enabled AIX | 9.1 TS1M3 | 9.3 TS1M0 |
64-bit Enabled HP-UX | 9.1 TS1M3 | 9.3 TS1M0 |
64-bit Enabled Solaris | 9.1 TS1M3 | 9.3 TS1M0 |
HP-UX IPF | 9.1 TS1M3 | 9.3 TS1M0 |
Linux | 9.1 TS1M3 | 9.3 TS1M0 |
OpenVMS Alpha | 9.1 TS1M3 | 9.3 TS1M0 |
Tru64 UNIX | 9.1 TS1M3 | 9.3 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
This code illustrates what occurs when a length longer than 16 bytes is given to the 'to-variable', in this case DURATION. It's necessary that the length remain at 16 bytes. Change the length on the LENGTH statement to 16 and it runs correctly.
data test;
start='01jan2010 00:00:00'dt;
end='04mar2011 00:00:00'dt;
length duration $18; * <<<<<<<<<<<<<<<<<<<<<<<<< ;
call is8601_convert('dt/dt','du',start,end,duration);
formatted=put(duration,$n8601b.);
run;
The to-variable' parameter does not allow a length of more than 16 bytes but the documentation does not state this.
Type: | Problem Note |
Priority: | medium |
Topic: | SAS Reference ==> CALL routines SAS Reference ==> DATA Step
|
Date Modified: | 2010-11-12 10:07:20 |
Date Created: | 2010-04-21 11:54:15 |